Appendix C — Google Colab
Google’s Colab is a good choice for a web based tool that has a free tier and easy to use. Since it is web based, there is nothing to install. Colab can be used to run the Jupyter notebooks contained in this book. Colab can be useful to obtain symbolic solutions for large or complex networks that would take a long time to run on a typical home desktop or laptop. For example, in Chapter 26, obtaining a symbolic solution took a few seconds running in Colab, compared to several hours on my laptop.
Google Colab (short for Google Colaboratory) is a free cloud service provided by Google that allows users to write and execute Python code in a browser-based environment. A gmail account is needed to run Colab. There is a free tier of service which is sutable for running the Jupyter notebooks in this book, however the computing enviroment is not saved between sessions.
The basic steps to open and run a Jupyter notebook are as follows:
- Open colab at the url: https://colab.research.google.com/.
- Upload a Jupyter notebook from Google drive, github or local storage.
- On the left hand side pane, select the file icon, then select upload to session storage, then upload SymMNA.py. This needs to be done at the beginning of each session.
- Cells for qmd and some markdown commands are not supported, but they can be ignored. Links to images will not work and need to be inserted using the menu at the top of the text cell (these broken links for the images can also be ignored).
- Colab creates a new folder in your Google drive called “Colab Notebooks”.
- The Colab computing enviroment is not saved in the free tier.
There are alternatives to Colab such as Kaggle, Cocalc, GitHub Codespaces, Anaconda Cloud and Deepnote which can be used if the limitiations of Google’s free or paid tiers are not acceptable.